<template>
  <div id="conflictDialog">
    <!--<el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>-->
    <el-dialog
      title="心跳认证"
      :visible.sync="conflictdialogShow"
      class="box"
      :before-close="handleClose"
      >
      <el-form :model="form">
        <el-form-item class="borderNone" label="原站点编号：" :label-width="formLabelWidth">
          <el-input v-model="form.state" auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item label="新站点编号：" :label-width="formLabelWidth">
          <el-input v-model="form.date" auto-complete="off"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="handleClose()">确 定</el-button>
        <el-button type="info" @click="handleClose()">取 消</el-button>
       </span>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        form: {
          state: 'GQ0001',
          date: ''
        },
        formLabelWidth: '120px',
        dialogBack: false
      }
    },
    created() {
      this.conflictdialogShow = true
    },
    methods: {
      // 子组件传值
      handleClose() {
        const dialogShow = this.dialogBack // 所需要传的值
        this.$emit('giveFalse', dialogShow) // 传值的参数
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  /*****************第一层弹窗*****************/
  /deep/ .box > .el-dialog{
    width: 540px !important;
    min-height: 250px;
    margin-top: 30vh !important;
    border-radius: 4px;
  }
  /*****************第一层弹窗头部*****************/
  /deep/ .box > .el-dialog > .el-dialog__header{
    width: 540px;
    height: 39px;
    line-height: 43px;
    padding: 0;

    font-weight: bolder;
    border-radius: 4px 4px 0 0;
    background-color: #e3e6ee;
  }
  /deep/ .box > .el-dialog > .el-dialog__header:before{
    display: inline-block;
    content: url("../../../../assets/heartbreak/alarm-icon.png");
    position: relative;
    top: 42px;
    left: 35px;
    z-index: 1;
    width: 18px;
    height: 18px;
  }
  /deep/ .box > .el-dialog > .el-dialog__header:after{
    display: inline-block;
    content: '当前站点编号与已有站点编号存在冲突，请更改当前站点编号！';
    position: relative;
    top: -6px;
    width: 540px;
    height: 39px;
    padding: 0;
    color: #F43B42;
    font-size:14px;
    font-weight: 400;
    text-indent: 60px;
    background-color: #FDD8D9;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn{
    top: 12px;
  }
  /deep/ .box > .el-dialog > .el-dialog__header > .el-dialog__headerbtn > i{
    font-size: 18px;
    font-weight: bolder;
  }
  /*****************第一层弹窗内容*****************/
  /deep/ .box > .el-dialog > .el-dialog__body{
    padding: 0 0 0 10px ;
    margin-top: 50px;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item{
    margin-bottom: 10px;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item > .el-form-item__label{
    color: #69727E;
    font-weight: normal;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .el-form-item > .el-form-item__content > .el-input > .el-input__inner{
    width: 240px;
    height: 30px;
    padding: 0 5px;
  }
  /deep/ .box > .el-dialog > .el-dialog__body > .el-form > .borderNone > .el-form-item__content > .el-input > .el-input__inner{
    border: none;
  }
  /*****************第一层弹窗底部*****************/
  /deep/ .box > .el-dialog > .el-dialog__footer{
    border-top: 1px solid #e3e6ee;
  }
  /*****************底部按钮*****************/
  /deep/ .dialog-footer{
    padding-top: 8px;
  }
  /deep/ .dialog-footer > .el-button{
    width: 80px;
    height: 30px;
    padding: 0;
  }
</style>
